package observer;

/**
 * 订阅者实现类
 */
public class ObserverImpl implements Observer{
    private String name;

    public ObserverImpl(String name) {
        this.name = name;
    }

    @Override
    public void notify(String account, Integer score) {
        System.out.println(name+"：接收到通知，账户"+account+"余额"+score);
    }
}
